import React,{useState} from 'react';

import {Form, Button, Col, Row, Input, Select, DatePicker } from 'antd';


function Dataform(props) {

    const [dataaddress,setDataAddress]=useState('')
    console.log(props);
    return (
        <div>
            <Form>
                <Form.Item label='数据地址'>
                    <Input
                        onChange={(e)=>{
                            console.log(e.target.value);
                            setDataAddress(e.target.value);
                            props.hide('123');
                        }}
                        placeholder={props.value}
                    />
                </Form.Item>
                <Form.Item label='修改名称'>
                    <Input
                        onChange={(e)=>{
                            // console.log(e.target.value);
                            setDataAddress(e.target.value);
                            props.s_cell.setAttrs(
                                {
                                    label: { text: e.target.value },
                                    text: { text: e.target.value },
                                }
                            )
                        }}
                        placeholder={'当前值:'+props.s_cell.getAttrs().text.text}

                    />
                </Form.Item>
            </Form>
        </div>
    );
}

export default Dataform;